﻿using Authentication.Core.Configuration;
using Authentication.Model.Model;
using Common.Data.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Authentication.Core.Data.DBConfig
{
    public class ChangeDaoProductConfiguration : DBConfig<ChangeDaoProduct>
    {
        public ChangeDaoProductConfiguration()
            : base(SystemConfiguration.Schema, SystemConfiguration.NamingType, SystemConfiguration.TABLE_PREFIX)
        {
            HasKey(k => new { k.Cif, k.NoProduct, k.TypeProduct });

            //relationship
            //HasOptional(t => t.ChangeDaoCif).WithMany(c => c.ChangeDaoProducts).HasForeignKey(t => new { t.Cif }).WillCascadeOnDelete(false);
        }
    }
}
